#ifndef _SOCKETIO_H
#define _SOCKETIO_H

namespace xy
{
class SocketIO
{
public:
    SocketIO(int);
    ~SocketIO() = default;

    int readn(char*, int) const;    // 更改数据无法避免const
    int sendn(const char*, int);
    int read_line(char*, int) const;
    int recv_peek();

private:
    int _fd;
};

}

#endif
